<template>

    <div class="my-statement">
        <div style="margin-top: -10px;background: #ffffff;height: 70px;padding-left: 10px;padding-top: 10px">
            <p>您当前所在位置:用户协议</p>
            <el-button slot="reference" type="text" size="small" style="float: right;margin-right: 10px;background: #f2f2f2;width: 80px;height: 32px;color: #2D2D2D;margin-top: -35px" @click="back_top">返回</el-button>
        </div>

        <div style="height: 128px;background: #fff;margin-top: -20px">

            <div style="width: 100%;height: 60px;line-height: 60px;text-align: center;color: #2d2d2d;font-size: 19px;font-weight: bolder;margin-top: 40px;padding-top: 10px">
                {{title}}
            </div>

            <div style="width: 100%;line-height: 50px;text-align: center;color: #2d2d2d;font-size: 14px;">
                协议生效日期：{{addtime}}
            </div>

            <div style="width: 100%;overflow: hidden;">
                <textarea class="comments" rows="100" cols="10">{{content}}</textarea>
<!--                <a-textarea placeholder="请输入消息内容" v-model="content" rows="8" style="float: left;height: 500px"/>-->
            </div>

        </div>
<!--        <a-textarea style="font-size: 14px;color: #4b4b4b" v-model="content" rows="10"></a-textarea>-->


<!--        <div class="ms-main" style="margin-top: 1px">-->
<!--            <a-textarea style="font-size: 14px;color: #4b4b4b" v-model="content" rows="100"></a-textarea>-->
<!--&lt;!&ndash;            <div style="width: 100%;overflow: hidden">&ndash;&gt;-->
<!--&lt;!&ndash;                &ndash;&gt;-->
<!--&lt;!&ndash;            </div>&ndash;&gt;-->
<!--        </div>-->
    </div>
</template>

<script>
    import Qs from "qs";
    import { postAction } from '@/api/manage'
    export default {
        data() {
            return {
                title:'明朗云用户协议',
                addtime:'2018-05-25 14:19:20',
                content:'内容'
            };
        },
        created() {
            // 肯定要加载数据的啦
            this.getmsgDate()
        },
        methods: {
            // 加载页面数据的方法
            getmsgDate(){
                let params2 = {
                    msg_id:this.$route.query.id,
                    type:'0'
                };
                postAction(domain.publicUrl+"/logic/interface/query_agreementDetail",Qs.stringify(params2)).then(res=>{
                    let result = res.data;
                    if(result.code==0){
                        this.title = result.data.title;
                        this.addtime = result.data.createTime;
                        this.content = result.data.content;
                    }
                });
            },
            back_top(){
                // this.$router.push('/my-message');
                localStorage.removeItem("token");
                window.history.go(0);
            }
        },
    };
</script>

<style lang="scss" scoped>
    .my-statement {
        box-sizing: border-box;
        padding: 30px 90px;

        .ms-main {
            background: #fff;
            box-sizing: border-box;
            padding: 20px 40px 30px;
            display: flex;

            .msm-left {
                width: 105px;
            }

            .msm-right {
                flex: 1;
                margin-left: 20px;

                .msmr-txt {
                    display: flex;
                    margin: 0 0 20px;

                    p {
                        font-size: 18px;
                        margin-right: 30px;
                        font-weight: 600;
                        color: #424242;

                        span {
                            color: #ce3815;
                            margin-left: 10px;
                        }
                    }
                }

                .msmr-pagination {
                    text-align: center;
                    margin: 35px 0 0;
                }
            }
        }
    }

    .comments {
       width:100%; /*自动适应父布局宽度*/
       overflow: auto;
       word-break:break-all;
       padding: 26px;
        font-size: 14px;
        line-height: 20px;
        word-wrap: break-word;
        overflow-x: hidden;
        overflow-y: auto;
        color: #2D2D2D;
    }
</style>
